<template>
    <div class="question">
        {{msg}}
        <br>
        {{test}}
        <br>
        <button @click="myClick">点我</button>
        <button @click="myClick1">点我复原</button>
    </div>
</template>

<script>
    export default {
        name: "",
        components: {},
        data() {
            return {
                msg:"我是msg",
                test:"我是test"
            }
        },
        methods: {
            myClick:function () {
                this.test = "我被改变了"
            },
            myClick1:function () {
                this.test = "我是test"
            }
        },
        watch: {
            test(val){
                this.msg = val
            }
        },
        mounted() {
        }
    }
</script>

<style scoped>

</style>